package com.woniuxy01;

import java.io.*;

/**
 * @author 作者
 * @create 2025-06-10 16:13
 */
public class Test06 {
    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("a.txt")))
        BufferedReader br = new BufferedReader(new FileReader("a.txt"));
        String line;
        while ((line = br.readLine()) != null) {
            System.out.println(line);
        }
        br.close();
    }

    public static void test01() throws IOException {
        //        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File("aaa"))))
        BufferedWriter bw=new BufferedWriter(new FileWriter("a.txt"));
        bw.write("1-zs-11-male");
        bw.newLine();
        bw.flush();
        bw.write("2-ls-12-fmale");
        bw.newLine();
        bw.flush();
        bw.write("3-ww-13-fmale");
        bw.newLine();
        bw.flush();
        bw.close();
    }
}
